package com.example.demo.controller;


import com.example.demo.common.Result;
import com.example.demo.service.SysFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统文件表 前端控制器
 * </p>
 *
 * @author ld&zjw
 * @since 2024-04-03
 */
@RestController
@RequestMapping("/sysfile")
public class SysFileController {
    @Autowired
    SysFileService sysFileService;

    @GetMapping
    public Result<?> findPage(@RequestParam(defaultValue = "1") Integer pageNum,
                              @RequestParam(defaultValue = "10") Integer pageSize,
                              @RequestParam(defaultValue = "") String fileName,
                              @RequestParam(defaultValue = "") String bucketName) {
        return Result.success(sysFileService.findPage(pageNum, pageSize, fileName, bucketName));
    }
}


